﻿<%@ Page Title="" Language="C#" Theme="Default_Themes" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="DSDoanVienBiKhaiTru.aspx.cs" Inherits="DanhMuc_DSDoanVienBiKhaiTru" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
    <asp:UpdatePanel ID="udt" runat="server">
        <ContentTemplate>
            <asp:Panel ID="pncontent" runat="server">
                <div class="row-fluid">
                    <div class="span12">
                        <div class="box">
                            <div class="box-title">
                                <h3><i class="icon-table"></i>Danh sách đoàn viên bị khai trừ: <%=st %></h3>
                                <div class="box-tool">
                                </div>
                            </div>
                            <div class="box-content" style="border: 1px solid #B6D1F2;">
                                <div class="btn-toolbar pull-right clearfix">
                                    <div class="btn-group">
                                        <asp:Button ID="Btn_khoiphucdoanvien" class="btn btn-info " OnClientClick="return confirm('Đoàn viên sẽ được kết nạp vào đoàn!')" runat="server" Text="Phục hồi" OnClick="Btn_khoiphucdoanvien_Click" Width="125px" />&nbsp;&nbsp;
                            <asp:Button ID="Btn_xoadoanvien" class="btn btn-danger" OnClientClick="return confirm('Bạn có chắc xóa không? Nếu xóa thì tất cả thông tin liên quan (cơ sở đoàn, đoàn viên sẽ bị xóa theo!)')" runat="server" Text="Xóa" OnClick="LinkButtonxoa_Click" Width="81px" />&nbsp;&nbsp;
                                    <asp:Button ID="Btn_xuatfile" runat="server" class="btn btn-inverse  " OnClick="ExporttoExcel" Text="Xuất file Excel" Width="112px" />

                                    </div>
                                </div>
                                <div class="clearfix">
                                    <br />
                                    <br />
                                    <asp:Label ID="lblstatus" runat="server" Visible="False"></asp:Label>
                                </div>
                                <div id="Div1" class="dataTables_wrapper form-inline" role="grid">
                                    </strong>
                                <div class="row-fluid">
                                    <asp:GridView ID="Grid_DSDV_Xoa" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" Width="100%" CellPadding="5" ForeColor="#333333" GridLines="None" Style="margin-top: 0px" OnSelectedIndexChanged="Grid_DSDV_Xoa_SelectedIndexChanged" CellSpacing="1" DataKeyNames="MaDoanVien" OnRowDeleting="Grid_DSDV_Xoa_RowDeleting" OnRowUpdating="Grid_DSDV_Xoa_RowUpdating" BorderStyle="Solid" BorderWidth="1px" OnRowCommand="Grid_DSDV_Xoa_RowCommand">
                                        <AlternatingRowStyle BackColor="White" />
                                        <Columns>
                                            <asp:TemplateField HeaderText="Chọn ">
                                                <HeaderTemplate>
                                                    <asp:CheckBox ID="chkselectAll" runat="server" OnCheckedChanged="chkInGridviewHeader_CheckedChanged" AutoPostBack="true" />
                                                </HeaderTemplate>
                                                <ItemTemplate>
                                                    <asp:CheckBox ID="chkchon" Enabled="true" Checked="false" runat="server" />
                                                </ItemTemplate>
                                                <ItemStyle CssClass="ItemGridCell" HorizontalAlign="Center" VerticalAlign="Middle" />
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Mã Đoàn Viên">
                                                <ItemTemplate>
                                                    <asp:Label runat="server" ID="lblMaDoanVien" Text='<%#Eval("MaDoanVien") %>'></asp:Label>
                                                </ItemTemplate>
                                                <ItemStyle CssClass="ItemGridCell" HorizontalAlign="Center" VerticalAlign="Middle" />
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Tên đoàn viên">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblTenDoanVien" runat="server" Text='<%#Eval("TenDoanVien") %>'></asp:Label>
                                                </ItemTemplate>
                                                <ItemStyle CssClass="ItemGridCell" HorizontalAlign="Center" VerticalAlign="Middle" />
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Phái">
                                                <ItemTemplate>
                                                    <%#Eval("Phai") %>
                                                </ItemTemplate>
                                                <ItemStyle CssClass="ItemGridCell" HorizontalAlign="Center" VerticalAlign="Middle" />
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Ngày sinh">
                                                <ItemTemplate>
                                                    <%#Eval("NgaySinh") %>
                                                </ItemTemplate>
                                                <ItemStyle CssClass="ItemGridCell" HorizontalAlign="Center" VerticalAlign="Middle" />
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="CMND">
                                                <ItemTemplate>
                                                    <%#Eval("CMND") %>
                                                </ItemTemplate>
                                                <ItemStyle CssClass="ItemGridCell" HorizontalAlign="Center" VerticalAlign="Middle" />
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Phục hồi đoàn viên">
                                                <ItemTemplate>
                                                    <asp:LinkButton ID="LinkButtonPhucHoi" runat="server" CausesValidation="false" CommandName="Update"
                                                        Text="<i class='icon-ok green'></i> Thực hiện" OnClientClick="return confirm('Đoàn viên bị khai trừ sẽ được phục hồi trở về đoàn viên!')"></asp:LinkButton>
                                                </ItemTemplate>
                                                <ItemStyle CssClass="ItemGridCell" HorizontalAlign="Center" VerticalAlign="Middle" />
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Xóa">
                                                <ItemTemplate>
                                                    <asp:LinkButton ID="LinkButtonxoa" runat="server" CausesValidation="false"
                                                        CommandName="Delete" Text="<i class='icon-remove red'></i> Xóa" OnClientClick="return confirm('Bạn có chắc xóa không? Nếu xóa thì tất cả thông tin liên quan (cơ sở đoàn, đoàn viên sẽ bị xóa theo!)')"></asp:LinkButton>
                                                </ItemTemplate>
                                                <ItemStyle CssClass="ItemGridCell" HorizontalAlign="Center" VerticalAlign="Middle" />
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Thông tin khai trừ">
                                                <ItemTemplate>
                                                    <asp:LinkButton ID="LinkButtonKhaiTru" runat="server" CausesValidation="false"
                                                        CommandName="cmdKhaiTruDoanVien" CommandArgument='<%#Eval("MaDoanVien") %>' Text="<i class='icon-file-text-alt red'></i> Chi tiết"></asp:LinkButton>
                                                </ItemTemplate>
                                                <ItemStyle CssClass="ItemGridCell" HorizontalAlign="Center" VerticalAlign="Middle" />
                                            </asp:TemplateField>
                                        </Columns>
                                        <EditRowStyle BackColor="#2461BF" />
                                        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                                        <RowStyle BackColor="#EFF3FB" />
                                        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                                        <SortedAscendingCellStyle BackColor="#F5F7FB" />
                                        <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                                        <SortedDescendingCellStyle BackColor="#E9EBEF" />
                                        <SortedDescendingHeaderStyle BackColor="#4870BE" />
                                    </asp:GridView>
                                </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </asp:Panel>
            <asp:Panel ID="pndetail" runat="server" Visible="false">
                <div class="row-fluid">
                    <div class="span12">
                        <div class="box">
                            <div class="box-title">
                                <h3><i class="icon-table"></i>Thông tin khai trừ đoàn viên</h3>
                                <div style="float: right;">
                                    <asp:LinkButton ID="linkclose" Visible="true" runat="server" class="btn btn-danger" OnClick="linkclose_Click"><i class="icon-signout"></i> Đóng</asp:LinkButton>
                                </div>
                            </div>
                            <div class="box-content" style="border: 1px solid #B6D1F2;">
                                <div class="control-group info">
                                    <label class="control-label" style="width: 250px; padding-right: 10px;">Tên đoàn viên</label>
                                    <div class="controls">
                                        <asp:TextBox ID="txtTenDoanVien" runat="server" CssClass="span6" onblur="KiemTraInjection(this);"></asp:TextBox>
                                    </div>
                                    <div style="height: 5px;"></div>
                                    <label class="control-label" style="width: 250px; padding-right: 10px;">Nghị quyết</label>
                                    <div class="controls">
                                        <asp:TextBox ID="txtNghiquyet" runat="server" CssClass="span6" onblur="KiemTraInjection(this);"></asp:TextBox>
                                    </div>
                                    <div style="height: 5px;"></div>
                                    <label class="control-label" style="width: 250px; padding-right: 10px;">Lý do bị khai trừ</label>
                                    <div class="controls">
                                        <asp:TextBox ID="txtLyDo" runat="server" CssClass="span6" onblur="KiemTraInjection(this);"></asp:TextBox>
                                    </div>
                                    <div style="height: 5px;"></div>
                                    <label class="control-label" style="width: 250px; padding-right: 10px;">Ngày ký quyết định khai trừ</label>
                                    <div class="controls">
                                        <asp:TextBox ID="txtNgayKy" runat="server" CssClass="span6" onblur="KiemTraInjection(this);"></asp:TextBox>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </asp:Panel>
        </ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="Btn_khoiphucdoanvien" EventName="Click" />
            <asp:AsyncPostBackTrigger ControlID="Btn_xoadoanvien" EventName="Click" />
            <asp:AsyncPostBackTrigger ControlID="Btn_xuatfile" EventName="Click" />
        </Triggers>
    </asp:UpdatePanel>

    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
</asp:Content>

